(component
  (type $ty-test:test/test (;0;)
    (instance
      (type (;0;) (func (param "v" s32) (result s32)))
      (export (;0;) "foo" (func (type 0)))
    )
  )
  (import "test:test/test" (instance $test:test/test (;0;) (type $ty-test:test/test)))
  (core module $main (;0;)
    (table (;0;) 2 funcref)
    (memory (;0;) 17)
    (global (;0;) (mut i32) i32.const 1048576)
    (global (;1;) (mut i32) i32.const 1048576)
    (global (;2;) (mut i32) i32.const 0)
    (global (;3;) i32 i32.const 1048592)
    (global (;4;) i32 i32.const 1)
    (global (;5;) i32 i32.const 1048592)
    (global (;6;) i32 i32.const 2)
    (global (;7;) (mut i32) i32.const 1048592)
    (global (;8;) (mut i32) i32.const 1114112)
    (export "__stack_pointer" (global 0))
    (export "__stack_high" (global 1))
    (export "__stack_low" (global 2))
    (export "foo:memory_base" (global 3))
    (export "foo:table_base" (global 4))
    (export "wit-component:stubs:memory_base" (global 5))
    (export "wit-component:stubs:table_base" (global 6))
    (export "__heap_base" (global 7))
    (export "__heap_end" (global 8))
    (export "__indirect_function_table" (table 0))
    (export "memory" (memory 0))
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $wit-component:stubs (;1;)
    (type (;0;) (func (param i32) (result i32)))
    (type (;1;) (func (param i32) (result i32)))
    (export "bar" (func 0))
    (export "foo" (func 1))
    (func (;0;) (type 0) (param i32) (result i32)
      unreachable
    )
    (func (;1;) (type 1) (param i32) (result i32)
      unreachable
    )
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core module $foo (;2;)
    (@dylink.0
      (mem-info (memory 0 4))
      (import-info "env" "foo" binding-weak)
      (import-info "env" "bar" binding-weak)
    )
    (type (;0;) (func (param i32) (result i32)))
    (import "test:test/test" "foo" (func $import_foo (;0;) (type 0)))
    (import "env" "foo" (func $import_foo2 (;1;) (type 0)))
    (import "env" "bar" (func $import_bar (;2;) (type 0)))
    (export "test:test/test#foo" (func $foo))
    (func $foo (;3;) (type 0) (param i32) (result i32)
      unreachable
    )
  )
  (core module $__init (;3;)
    (type (;0;) (func))
    (type (;1;) (func (param i32)))
    (import "env" "memory" (memory (;0;) 0))
    (import "env" "__indirect_function_table" (table (;0;) 0 funcref))
    (start 0)
    (elem (;0;) (i32.const 1) func)
    (elem (;1;) (i32.const 2) func)
    (func (;0;) (type 0))
    (data (;0;) (i32.const 1048576) "\00\00\00\00\00\00\10\00")
    (@producers
      (processed-by "wit-component" "$CARGO_PKG_VERSION")
    )
  )
  (core instance $main (;0;) (instantiate $main))
  (alias core export $main "memory" (core memory $memory (;0;)))
  (core instance $wit-component:stubs (;1;) (instantiate $wit-component:stubs))
  (alias export $test:test/test "foo" (func $foo (;0;)))
  (core func $foo (;0;) (canon lower (func $foo)))
  (core instance $test:test/test (;2;)
    (export "foo" (func $foo))
  )
  (alias core export $wit-component:stubs "foo" (core func $"#core-func1 foo" (@name "foo") (;1;)))
  (alias core export $wit-component:stubs "bar" (core func $bar (;2;)))
  (core instance $env (;3;)
    (export "foo" (func $"#core-func1 foo"))
    (export "bar" (func $bar))
  )
  (core instance $foo (;4;) (instantiate $foo
      (with "test:test/test" (instance $test:test/test))
      (with "env" (instance $env))
    )
  )
  (core instance $__init (;5;) (instantiate $__init
      (with "env" (instance $main))
    )
  )
  (type (;1;) (func (param "v" s32) (result s32)))
  (alias core export $foo "test:test/test#foo" (core func $test:test/test#foo (;3;)))
  (func $"#func1 foo" (@name "foo") (;1;) (type 1) (canon lift (core func $test:test/test#foo)))
  (component $test:test/test-shim-component (;0;)
    (type (;0;) (func (param "v" s32) (result s32)))
    (import "import-func-foo" (func (;0;) (type 0)))
    (type (;1;) (func (param "v" s32) (result s32)))
    (export (;1;) "foo" (func 0) (func (type 1)))
  )
  (instance $test:test/test-shim-instance (;1;) (instantiate $test:test/test-shim-component
      (with "import-func-foo" (func $"#func1 foo"))
    )
  )
  (export $"#instance2 test:test/test" (@name "test:test/test") (;2;) "test:test/test" (instance $test:test/test-shim-instance))
  (@producers
    (processed-by "wit-component" "$CARGO_PKG_VERSION")
  )
)
